<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Shopbase extends Controller_Base {
	
	protected $data;
	
	public function template()
	{
		parent::template();
		$data = array();
		$data['lang'] = $this->request->param('lang','');
		$shop = new Model_Shop();
		$lang = new Model_Lang();
		
		if($this->session->get('products', null) != null)
		{
			$data['countPproducts'] = (count($this->session->get('products', 0)));
		}
		else
		{
			$data['countPproducts'] = 0;
		}
		
		
		$data['translate'] = $lang->getTranslate("shopbase", $data['lang'] );
		
		$data['shopCategorys'] = $shop->getAllCategory();
		$this->data['shopmenu']  =  View::factory('shop/shopmenu', $data);
	}
	
} // End Welcome
